<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Conservacion y Bancos de Forraje</title>
</head>

<body>
<form name="frm" action='ConservacionYBancosForraje.php' method='POST'>
<h2>Seleccione el Tipo de Conservacion de Forrajes</h2>
<input type="checkbox" name="er2[]"value="Ensilaje de Maiz">Ensilaje de Maiz<br/>
<input type="checkbox" name="er2[]"value="Ensilaje de Corte">Ensilaje de Corte<br/>
<input type="checkbox" name="er2[]"value="Ensilaje Leguminosas">Ensilaje Leguminosas<br/>
<input type="checkbox" name="er2[]"value="Heno">Heno<br/>

<input type='submit' name="Seleccionar"value='Agregar' />

<br /> <br /> 
 </form>


<br /> <br /> 

<form name="frm" action='ConservacionYBancosForraje.php' method='POST'>

<h2>Seleccione el Tipo de Bancos de Forraje</h2>
<input type="checkbox" name="er[]"value="Caña de Azucar">Caña de Azucar<br/>
<input type="checkbox" name="er[]"value="Camerun">Camerun<br/>
<input type="checkbox" name="er[]"value="Maralfalfa">Maralfalfa<br/>
<input type="checkbox" name="er[]"value="Cratylia">Cratylia<br/>
<input type="checkbox" name="er[]"value="Transvala">Transvala<br/>
<input type="checkbox" name="er[]"value="Angleton">Angleton<br/>
<input type="checkbox" name="er[]"value="Otros">Otros <td><input type="text" name="teb" id="teb",td><br/>
<br/>
<input type='submit' name="Seleccionar"value='Agregar' />


 </form>

</body>
</html>

<?php
$server = "localhost";
$user = "Magsi";
$pass = "Magsi"; //depende de tu pass de mysql 

$conexion = mysql_connect($server, $user, $pass);
$db = mysql_select_db("magsi_db", $conexion);


$er2 = implode(" | ",$_POST["er2"]);
$kil ="Kilos";

		$consulta = "insert into ma_af_forraje(MA_V_TipoForraje, MA_V_TipoMedida) values ('$er2', '$kil')";
		$result = mysql_query($consulta, $conexion);  



?>


<?php
$server = "localhost";
$user = "Magsi";
$pass = "Magsi"; //depende de tu pass de mysql 

$conexion = mysql_connect($server, $user, $pass);
$db = mysql_select_db("magsi_db", $conexion);


$er = implode(" | ",$_POST["er"]);
$hect ="hectareas";

		$consulta = "insert into ma_af_forraje(MA_V_TipoForraje, MA_V_TipoMedida) values ('$er', '$hect')";
		$result = mysql_query($consulta, $conexion);  



?>

